
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.ListIterator;

import org.ictclas4j.bean.SegResult;
import org.ictclas4j.segment.SegTag;

class segment
{
	public void segmentcontent()
	{
		SegTag st = new SegTag(1);
		String tmp;
		for(String s:search.content)
		{
			SegResult sr = st.split(s);
			tmp = sr.getFinalResult();
			//tmp.replaceAll("\0", " ");
			
			System.out.println(tmp.replaceAll("/[a-z]+ ", " "));
			search.content_seg.add(tmp.replaceAll("/[a-z]+ ", " "));
		}
		return;
	}
	public String adjustformat(String s)
	{
		ArrayList<String> list = new ArrayList(Arrays.asList(s.split(" ")));
		ListIterator<String> itr = list.listIterator();
		while(itr.hasNext())
			if(itr.equals(" "))
				itr.remove();
		while(itr.hasPrevious())
		{
			String t = itr.next();
			if(t.endsWith("/r"))
				itr.remove();
		}

		return "";
	}
}